package com.remoter.basic.bean.support;

import com.remoter.basic.bean.AbstractMessage;
import com.remoter.basic.util.Guid;

/**
 * @author			koko
 * @date 			2017-08-09 09:12:11
 * @description 	类功能说明
 */
public class RemoterRequest extends AbstractMessage{

	private static final long serialVersionUID = -5701959678273123025L;
	
	private long token;
	private String type;
	private String bean;
	private String method;
	private Class<?>[] paramType;
	private Object[] paramObject;
	
	private String protocol;
	private String fromHost;
	private int fromPort;
	private String toHost;
	private int toPort;
	
	public RemoterRequest() {
		this.token = Guid.get();
	}
	
	public long getToken() {
		return token;
	}
	public void setToken(long token) {
		this.token = token;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getBean() {
		return bean;
	}
	public void setBean(String bean) {
		this.bean = bean;
	}
	public String getMethod() {
		return method;
	}
	public void setMethod(String method) {
		this.method = method;
	}
	public Class<?>[] getParamType() {
		return paramType;
	}
	public void setParamType(Class<?>[] paramType) {
		this.paramType = paramType;
	}
	public Object[] getParamObject() {
		return paramObject;
	}
	public void setParamObject(Object[] paramObject) {
		this.paramObject = paramObject;
	}
	public String getProtocol() {
		return protocol;
	}
	public void setProtocol(String protocol) {
		this.protocol = protocol;
	}
	public String getFromHost() {
		return fromHost;
	}
	public void setFromHost(String fromHost) {
		this.fromHost = fromHost;
	}
	public int getFromPort() {
		return fromPort;
	}
	public void setFromPort(int fromPort) {
		this.fromPort = fromPort;
	}
	public String getToHost() {
		return toHost;
	}
	public void setToHost(String toHost) {
		this.toHost = toHost;
	}
	public int getToPort() {
		return toPort;
	}
	public void setToPort(int toPort) {
		this.toPort = toPort;
	}
	
	@Override
	public String toString(){
		StringBuilder sb = new StringBuilder(super.toString());
		sb.append("{");
		sb.append("token:").append(this.token).append(",");
		sb.append("type:").append(this.type).append(",");
		sb.append("bean:").append(this.bean).append(",");
		sb.append("method:").append(this.method).append(",");
		sb.append("paramType:").append(this.paramType).append(",");
		sb.append("paramObject:").append(this.paramObject).append("}");
		return sb.toString();
	}
	
	
}